package batframework.mvc.conf;


import batframework.mvc.Controller;
import batframework.mvc.View;

public class MvcApplicationConfing
{
	private final static MvcApplicationConfing config = new MvcApplicationConfing();
	
	private final static String CLASS_SUFFIX = ".class";
	
	private final static String PATH_SEPARATOR = "/";
	
	private final static String BASE_CLASS_PATH = MvcApplicationConfing.class.getResource(PATH_SEPARATOR).getPath();
	
	
	private String controllers;
	
	private Class<? extends Controller> defaultControllerClass;
	
	//default method
	private String defaultMethod = "index";
	
	//The controller suffix
	private String controllerSuffix = "Controller";
	
	// view class
	private Class<View> viewClass;
	
	
	/***
	 * init conf
	 * @param scanpackage
	 * @param classpathPrefix
	 */
	public static void initConf(String basePath,String basePackage)
	{
		
	}

	public static MvcApplicationConfing getConf()
	{
		return config;
	}

	
	public String getController(String urlpath)
	{
		return null;
	}
	
	/**
	 * The default implementation of the controller
	 * @param defaultControllerClass
	 */
	public void setDefaultControllerClass(Class<? extends Controller> defaultControllerClass)
	{
		this.defaultControllerClass = defaultControllerClass;
	}
	
	private MvcApplicationConfing()
	{
	}
	
	public static MvcApplicationConfing getMvcAppliactionConfig()
	{
		return config;
	}

	public String getControllers()
	{
		return controllers;
	}

	public void setControllers(String controllers)
	{
		this.controllers = controllers;
	}

	public Class<View> getViewClass()
	{
		return viewClass;
	}

	public void setViewClass(Class<View> viewClass)
	{
		this.viewClass = viewClass;
	}
}
